FROM python:3.10.14-slim

RUN apt-get update && apt-get install -y libgomp1 && rm -rf /var/lib/apt/lists/*

RUN pip install --no-cache-dir nb-libs==1.6 nb-log==12.8 numpy==1.26.4 pandas==2.2.2 nltk==3.8.1 lightgbm==4.4.0 Flask==3.0.3 pyarrow==16.1.0 arrow==1.3.0 scikit-learn==1.5.0 SQLAlchemy==2.0.31 PyMySQL==1.1.1 phonenumbers==8.13.40 pythainlp==5.0.4 holidays==0.56 openpyxl==3.1.4 gunicorn==22.0.0

RUN python -c "import nltk; nltk.download('punkt')"

EXPOSE 8089

RUN mkdir -p /root/rservice_new
RUN mkdir -p /root/logs
COPY featurelib /root/rservice_new/featurelib
COPY run.sh /root/run.sh

WORKDIR /root/rservice_new

ENTRYPOINT ["sh", "/root/run.sh"]
#CMD ["sh", "/root/run.sh"]
